package org.dtrd.modules.archive.entity.bean.lifeway;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.dtrd.modules.archive.entity.po.DtrdEntRdArchiveLifeway;

/**
 * @author : qiannai
 * @date: 2022/8/11 18:21
 * @describe :
 */
@Data
@ApiModel(value = "运动情况", description = "运动情况表单")
public class LifewayExerciseDTO {

    private Integer dataId;

    @ApiModelProperty("患者ID")
    private Integer patientId;

    @ApiModelProperty("是否热爱运动 热爱-1，一般-2，不爱动-3")
    private Integer lifewaySport;

    @ApiModelProperty("运动禁忌症：0-无,1-有,2-不清楚")
    private Integer exerciseTaboo;

    @ApiModelProperty("运动方式 逗号拼接")
    private String exerciseMode;

    @ApiModelProperty("运动方式其他")
    private String exerciseModeOther;

    @ApiModelProperty("运动频率：每周次数")
    private Integer exerciseFrequency;

    @ApiModelProperty("运动强度 1 强 ，2 中 ，3 低")
    private Integer exerciseDuration;

    @ApiModelProperty("运动时长，单位小时")
    private String exerciseDurationHour;

    @ApiModelProperty("运动时机：1-空腹,2-餐后,3-不固定")
    private Integer exerciseOpporunity;

    @ApiModelProperty("运动情况评分EX")
    private Integer exerciseHabitsScore;

    @ApiModelProperty("运动情况小结EX")
    private String exerciseHabitsComment;

    public LifewayExerciseDTO parseFromPo(DtrdEntRdArchiveLifeway po){
        dataId = po.getDataId();
        patientId = po.getPatientId();
        lifewaySport = po.getLifewaySport();
        exerciseTaboo = po.getExerciseTaboo();
        exerciseMode = po.getExerciseMode();
        exerciseModeOther = po.getExerciseModeOther();
        exerciseFrequency = po.getExerciseFrequency();
        exerciseDuration = po.getExerciseDuration();
        exerciseDurationHour = po.getExerciseDurationHour();
        exerciseOpporunity = po.getExerciseOpporunity();
        exerciseHabitsScore = po.getExerciseHabitsScore();
        exerciseHabitsComment = po.getExerciseHabitsComment();
        return this;
    }
}
